(function ($, undefined){
'use strict';
var defaults={
item: 3,
autoWidth: false,
slideMove: 1,
slideMargin: 10,
addClass: '',
mode: 'slide',
useCSS: true,
cssEasing: 'ease', //'cubic-bezier(0.25, 0, 0.25, 1)',
easing: 'linear', //'for jquery animation',//
speed: 400, //ms'
auto: false,
pauseOnHover: false,
loop: false,
slideEndAnimation: true,
pause: 2000,
keyPress: false,
controls: true,
prevHtml: '',
nextHtml: '',
rtl: false,
adaptiveHeight: false,
vertical: false,
verticalHeight: 500,
vThumbWidth: 100,
thumbItem: 10,
pager: true,
gallery: false,
galleryMargin: 5,
thumbMargin: 5,
currentPagerPosition: 'middle',
enableTouch: true,
enableDrag: true,
freeMove: true,
swipeThreshold: 40,
responsive: [],
onBeforeStart: function ($el){},
onSliderLoad: function ($el){},
onBeforeSlide: function ($el, scene){},
onAfterSlide: function ($el, scene){},
onBeforeNextSlide: function ($el, scene){},
onBeforePrevSlide: function ($el, scene){}
};
$.fn.lightSlider=function (options){
if(this.length===0){
return this;
}
if(this.length > 1){
this.each(function (){
$(this).lightSlider(options);
});
return this;
}
var plugin={},
settings=$.extend(true, {}, defaults, options),
settingsTemp={},
$el=this;
plugin.$el=this;
if(settings.mode==='fade'){
settings.vertical=false;
}
var $children=$el.children(),
windowW=$(window).width(),
breakpoint=null,
resposiveObj=null,
length=0,
w=0,
on=false,
elSize=0,
$slide='',
scene=0,
property=(settings.vertical===true) ? 'height':'width',
gutter=(settings.vertical===true) ? 'margin-bottom':'margin-right',
slideValue=0,
pagerWidth=0,
slideWidth=0,
thumbWidth=0,
interval=null,
isTouch=('ontouchstart' in document.documentElement);
var refresh={};
refresh.chbreakpoint=function (){
windowW=$(window).width();
if(settings.responsive.length){
var item;
if(settings.autoWidth===false){
item=settings.item;
}
if(windowW < settings.responsive[0].breakpoint){
for (var i=0; i < settings.responsive.length; i++){
if(windowW < settings.responsive[i].breakpoint){
breakpoint=settings.responsive[i].breakpoint;
resposiveObj=settings.responsive[i];
}}
}
if(typeof resposiveObj!=='undefined'&&resposiveObj!==null){
for (var j in resposiveObj.settings){
if(resposiveObj.settings.hasOwnProperty(j)){
if(typeof settingsTemp[j]==='undefined'||settingsTemp[j]===null){
settingsTemp[j]=settings[j];
}
settings[j]=resposiveObj.settings[j];
}}
}
if(!$.isEmptyObject(settingsTemp)&&windowW > settings.responsive[0].breakpoint){
for (var k in settingsTemp){
if(settingsTemp.hasOwnProperty(k)){
settings[k]=settingsTemp[k];
}}
}
if(settings.autoWidth===false){
if(slideValue > 0&&slideWidth > 0){
if(item!==settings.item){
scene=Math.round(slideValue / ((slideWidth + settings.slideMargin) * settings.slideMove));
}}
}}
};
refresh.calSW=function (){
if(settings.autoWidth===false){
slideWidth=(elSize - ((settings.item * (settings.slideMargin)) - settings.slideMargin)) / settings.item;
}};
refresh.calWidth=function (cln){
var ln=cln===true ? $slide.find('.lslide').length:$children.length;
if(settings.autoWidth===false){
w=ln * (slideWidth + settings.slideMargin);
}else{
w=0;
for (var i=0; i < ln; i++){
w +=(parseInt($children.eq(i).width()) + settings.slideMargin);
}}
return w;
};
plugin={
doCss: function (){
var support=function (){
var transition=['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition'];
var root=document.documentElement;
for (var i=0; i < transition.length; i++){
if(transition[i] in root.style){
return true;
}}
};
if(settings.useCSS&&support()){
return true;
}
return false;
},
keyPress: function (){
if(settings.keyPress){
$(document).on('keyup.lightslider', function (e){
if(!$(':focus').is('input, textarea')){
if(e.preventDefault){
e.preventDefault();
}else{
e.returnValue=false;
}
if(e.keyCode===37){
$el.goToPrevSlide();
}else if(e.keyCode===39){
$el.goToNextSlide();
}}
});
}},
controls: function (){
if(settings.controls){
$el.after('
');
if(!settings.autoWidth){
if(length <=settings.item){
$slide.find('.lSAction').hide();
}}else{
if(refresh.calWidth(false) < elSize){
$slide.find('.lSAction').hide();
}}
$slide.find('.lSAction a').on('click', function (e){
if(e.preventDefault){
e.preventDefault();
}else{
e.returnValue=false;
}
if($(this).attr('class')==='lSPrev'){
$el.goToPrevSlide();
}else{
$el.goToNextSlide();
}
return false;
});
}},
initialStyle: function (){
var $this=this;
if(settings.mode==='fade'){
settings.autoWidth=false;
settings.slideEndAnimation=false;
}
if(settings.auto){
settings.slideEndAnimation=false;
}
if(settings.autoWidth){
settings.slideMove=1;
settings.item=1;
}
if(settings.loop){
settings.slideMove=1;
settings.freeMove=false;
}
settings.onBeforeStart.call(this, $el);
refresh.chbreakpoint();
$el.addClass('lightSlider').wrap('');
$slide=$el.parent('.lSSlideWrapper');
if(settings.rtl===true){
$slide.parent().addClass('lSrtl');
}
if(settings.vertical){
$slide.parent().addClass('vertical');
elSize=settings.verticalHeight;
$slide.css('height', elSize + 'px');
}else{
elSize=$el.outerWidth();
}
$children.addClass('lslide');
if(settings.loop===true&&settings.mode==='slide'){
refresh.calSW();
refresh.clone=function (){
if(refresh.calWidth(true) > elSize){
var tWr=0,
tI=0;
for (var k=0; k < $children.length; k++){
tWr +=(parseInt($el.find('.lslide').eq(k).width()) + settings.slideMargin);
tI++;
if(tWr >=(elSize + settings.slideMargin)){
break;
}}
var tItem=settings.autoWidth===true ? tI:settings.item;
if(tItem < $el.find('.clone.left').length){
for (var i=0; i < $el.find('.clone.left').length - tItem; i++){
$children.eq(i).remove();
}}
if(tItem < $el.find('.clone.right').length){
for (var j=$children.length - 1; j > ($children.length - 1 - $el.find('.clone.right').length); j--){
scene--;
$children.eq(j).remove();
}}
for (var n=$el.find('.clone.right').length; n < tItem; n++){
$el.find('.lslide').eq(n).clone().removeClass('lslide').addClass('clone right').appendTo($el);
scene++;
}
for (var m=$el.find('.lslide').length - $el.find('.clone.left').length; m > ($el.find('.lslide').length - tItem); m--){
$el.find('.lslide').eq(m - 1).clone().removeClass('lslide').addClass('clone left').prependTo($el);
}
$children=$el.children();
}else{
if($children.hasClass('clone')){
$el.find('.clone').remove();
$this.move($el, 0);
}}
};
refresh.clone();
}
refresh.sSW=function (){
length=$children.length;
if(settings.rtl===true&&settings.vertical===false){
gutter='margin-left';
}
if(settings.autoWidth===false){
$children.css(property, slideWidth + 'px');
}
$children.css(gutter, settings.slideMargin + 'px');
w=refresh.calWidth(false);
$el.css(property, w + 'px');
if(settings.loop===true&&settings.mode==='slide'){
if(on===false){
scene=$el.find('.clone.left').length;
}}
};
refresh.calL=function (){
$children=$el.children();
length=$children.length;
};
if(this.doCss()){
$slide.addClass('usingCss');
}
refresh.calL();
if(settings.mode==='slide'){
refresh.calSW();
refresh.sSW();
if(settings.loop===true){
slideValue=$this.slideValue();
this.move($el, slideValue);
}
if(settings.vertical===false){
this.setHeight($el, false);
}}else{
this.setHeight($el, true);
$el.addClass('lSFade');
if(!this.doCss()){
$children.fadeOut(0);
$children.eq(scene).fadeIn(0);
}}
if(settings.loop===true&&settings.mode==='slide'){
$children.eq(scene).addClass('active');
}else{
$children.first().addClass('active');
}},
pager: function (){
var $this=this;
refresh.createPager=function (){
thumbWidth=(elSize - ((settings.thumbItem * (settings.thumbMargin)) - settings.thumbMargin)) / settings.thumbItem;
var $children=$slide.find('.lslide');
var length=$slide.find('.lslide').length;
var i=0,
pagers='',
v=0;
for (i=0; i < length; i++){
if(settings.mode==='slide'){
if(!settings.autoWidth){
v=i * ((slideWidth + settings.slideMargin) * settings.slideMove);
}else{
v +=((parseInt($children.eq(i).width()) + settings.slideMargin) * settings.slideMove);
}}
var thumb=$children.eq(i * settings.slideMove).attr('data-thumb');
if(settings.gallery===true){
pagers +='';
}else{
pagers +='' + (i + 1) + '';
}
if(settings.mode==='slide'){
if((v) >=w - elSize - settings.slideMargin){
i=i + 1;
var minPgr=2;
if(settings.autoWidth){
pagers +='' + (i + 1) + '';
minPgr=1;
}
if(i < minPgr){
pagers=null;
$slide.parent().addClass('noPager');
}else{
$slide.parent().removeClass('noPager');
}
break;
}}
}
var $cSouter=$slide.parent();
$cSouter.find('.lSPager').html(pagers);
if(settings.gallery===true){
if(settings.vertical===true){
$cSouter.find('.lSPager').css('width', settings.vThumbWidth + 'px');
}
pagerWidth=(i * (settings.thumbMargin + thumbWidth)) + 0.5;
$cSouter.find('.lSPager').css({
property: pagerWidth + 'px',
'transition-duration': settings.speed + 'ms'
});
if(settings.vertical===true){
$slide.parent().css('padding-right', (settings.vThumbWidth + settings.galleryMargin) + 'px');
}
$cSouter.find('.lSPager').css(property, pagerWidth + 'px');
}
var $pager=$cSouter.find('.lSPager').find('li');
$pager.first().addClass('active');
$pager.on('click', function (){
if(settings.loop===true&&settings.mode==='slide'){
scene=scene + ($pager.index(this) - $cSouter.find('.lSPager').find('li.active').index());
}else{
scene=$pager.index(this);
}
$el.mode(false);
if(settings.gallery===true){
$this.slideThumb();
}
return false;
});
};
if(settings.pager){
var cl='lSpg';
if(settings.gallery){
cl='lSGallery';
}
$slide.after('');
var gMargin=(settings.vertical) ? 'margin-left':'margin-top';
$slide.parent().find('.lSPager').css(gMargin, settings.galleryMargin + 'px');
refresh.createPager();
}
setTimeout(function (){
refresh.init();
}, 0);
},
setHeight: function (ob, fade){
var obj=null,
$this=this;
if(settings.loop){
obj=ob.children('.lslide ').first();
}else{
obj=ob.children().first();
}
var setCss=function (){
var tH=obj.outerHeight(),
tP=0,
tHT=tH;
if(fade){
tH=0;
tP=((tHT) * 100) / elSize;
}
ob.css({
'height': tH + 'px',
'padding-bottom': tP + '%'
});
};
setCss();
if(obj.find('img').length){
if(obj.find('img')[0].complete){
setCss();
if(!interval){
$this.auto();
}}else{
obj.find('img').load(function (){
setTimeout(function (){
setCss();
if(!interval){
$this.auto();
}}, 100);
});
}}else{
if(!interval){
$this.auto();
}}
},
active: function (ob, t){
if(this.doCss()&&settings.mode==='fade'){
$slide.addClass('on');
}
var sc=0;
if(scene * settings.slideMove < length){
ob.removeClass('active');
if(!this.doCss()&&settings.mode==='fade'&&t===false){
ob.fadeOut(settings.speed);
}
if(t===true){
sc=scene;
}else{
sc=scene * settings.slideMove;
}
var l, nl;
if(t===true){
l=ob.length;
nl=l - 1;
if(sc + 1 >=l){
sc=nl;
}}
if(settings.loop===true&&settings.mode==='slide'){
if(t===true){
sc=scene - $el.find('.clone.left').length;
}else{
sc=scene * settings.slideMove;
}
if(t===true){
l=ob.length;
nl=l - 1;
if(sc + 1===l){
sc=nl;
}else if(sc + 1 > l){
sc=0;
}}
}
if(!this.doCss()&&settings.mode==='fade'&&t===false){
ob.eq(sc).fadeIn(settings.speed);
}
ob.eq(sc).addClass('active');
}else{
ob.removeClass('active');
ob.eq(ob.length - 1).addClass('active');
if(!this.doCss()&&settings.mode==='fade'&&t===false){
ob.fadeOut(settings.speed);
ob.eq(sc).fadeIn(settings.speed);
}}
},
move: function (ob, v){
if(settings.rtl===true){
v=-v;
}
if(this.doCss()){
if(settings.vertical===true){
ob.css({
'transform': 'translate3d(0px, ' + (-v) + 'px, 0px)',
'-webkit-transform': 'translate3d(0px, ' + (-v) + 'px, 0px)'
});
}else{
ob.css({
'transform': 'translate3d(' + (-v) + 'px, 0px, 0px)',
'-webkit-transform': 'translate3d(' + (-v) + 'px, 0px, 0px)',
});
}}else{
if(settings.vertical===true){
ob.css('position', 'relative').animate({
top: -v + 'px'
}, settings.speed, settings.easing);
}else{
ob.css('position', 'relative').animate({
left: -v + 'px'
}, settings.speed, settings.easing);
}}
var $thumb=$slide.parent().find('.lSPager').find('li');
this.active($thumb, true);
},
fade: function (){
this.active($children, false);
var $thumb=$slide.parent().find('.lSPager').find('li');
this.active($thumb, true);
},
slide: function (){
var $this=this;
refresh.calSlide=function (){
if(w > elSize){
slideValue=$this.slideValue();
$this.active($children, false);
if((slideValue) > w - elSize - settings.slideMargin){
slideValue=w - elSize - settings.slideMargin;
}else if(slideValue < 0){
slideValue=0;
}
$this.move($el, slideValue);
if(settings.loop===true&&settings.mode==='slide'){
if(scene >=(length - ($el.find('.clone.left').length / settings.slideMove))){
$this.resetSlide($el.find('.clone.left').length);
}
if(scene===0){
$this.resetSlide($slide.find('.lslide').length);
}}
}};
refresh.calSlide();
},
resetSlide: function (s){
var $this=this;
$slide.find('.lSAction a').addClass('disabled');
setTimeout(function (){
scene=s;
$slide.css('transition-duration', '0ms');
slideValue=$this.slideValue();
$this.active($children, false);
plugin.move($el, slideValue);
setTimeout(function (){
$slide.css('transition-duration', settings.speed + 'ms');
$slide.find('.lSAction a').removeClass('disabled');
}, 50);
}, settings.speed + 100);
},
slideValue: function (){
var _sV=0;
if(settings.autoWidth===false){
_sV=scene * ((slideWidth + settings.slideMargin) * settings.slideMove);
}else{
_sV=0;
for (var i=0; i < scene; i++){
_sV +=(parseInt($children.eq(i).width()) + settings.slideMargin);
}}
return _sV;
},
slideThumb: function (){
var position;
switch (settings.currentPagerPosition){
case 'left':
position=0;
break;
case 'middle':
position=(elSize / 2) - (thumbWidth / 2);
break;
case 'right':
position=elSize - thumbWidth;
}
var sc=scene - $el.find('.clone.left').length;
var $pager=$slide.parent().find('.lSPager');
if(settings.mode==='slide'&&settings.loop===true){
if(sc >=$pager.children().length){
sc=0;
}else if(sc < 0){
sc=$pager.children().length;
}}
var thumbSlide=sc * ((thumbWidth + settings.thumbMargin)) - (position);
if((thumbSlide + elSize) > pagerWidth){
thumbSlide=pagerWidth - elSize - settings.thumbMargin;
}
if(thumbSlide < 0){
thumbSlide=0;
}
this.move($pager, thumbSlide);
},
auto: function (){
if(settings.auto){
clearInterval(interval);
interval=setInterval(function (){
$el.goToNextSlide();
}, settings.pause);
}},
pauseOnHover: function(){
var $this=this;
if(settings.auto&&settings.pauseOnHover){
$slide.on('mouseenter', function(){
$(this).addClass('ls-hover');
$el.pause();
settings.auto=true;
});
$slide.on('mouseleave',function(){
$(this).removeClass('ls-hover');
if(!$slide.find('.lightSlider').hasClass('lsGrabbing')){
$this.auto();
}});
}},
touchMove: function (endCoords, startCoords){
$slide.css('transition-duration', '0ms');
if(settings.mode==='slide'){
var distance=endCoords - startCoords;
var swipeVal=slideValue - distance;
if((swipeVal) >=w - elSize - settings.slideMargin){
if(settings.freeMove===false){
swipeVal=w - elSize - settings.slideMargin;
}else{
var swipeValT=w - elSize - settings.slideMargin;
swipeVal=swipeValT + ((swipeVal - swipeValT) / 5);
}}else if(swipeVal < 0){
if(settings.freeMove===false){
swipeVal=0;
}else{
swipeVal=swipeVal / 5;
}}
this.move($el, swipeVal);
}},
touchEnd: function (distance){
$slide.css('transition-duration', settings.speed + 'ms');
if(settings.mode==='slide'){
var mxVal=false;
var _next=true;
slideValue=slideValue - distance;
if((slideValue) > w - elSize - settings.slideMargin){
slideValue=w - elSize - settings.slideMargin;
if(settings.autoWidth===false){
mxVal=true;
}}else if(slideValue < 0){
slideValue=0;
}
var gC=function (next){
var ad=0;
if(!mxVal){
if(next){
ad=1;
}}
if(!settings.autoWidth){
var num=slideValue / ((slideWidth + settings.slideMargin) * settings.slideMove);
scene=parseInt(num) + ad;
if(slideValue >=(w - elSize - settings.slideMargin)){
if(num % 1!==0){
scene++;
}}
}else{
var tW=0;
for (var i=0; i < $children.length; i++){
tW +=(parseInt($children.eq(i).width()) + settings.slideMargin);
scene=i + ad;
if(tW >=slideValue){
break;
}}
}};
if(distance >=settings.swipeThreshold){
gC(false);
_next=false;
}else if(distance <=-settings.swipeThreshold){
gC(true);
_next=false;
}
$el.mode(_next);
this.slideThumb();
}else{
if(distance >=settings.swipeThreshold){
$el.goToPrevSlide();
}else if(distance <=-settings.swipeThreshold){
$el.goToNextSlide();
}}
},
enableDrag: function (){
var $this=this;
if(!isTouch){
var startCoords=0,
endCoords=0,
isDraging=false;
$slide.find('.lightSlider').addClass('lsGrab');
$slide.on('mousedown', function (e){
if(w < elSize){
if(w!==0){
return false;
}}
if($(e.target).attr('class')!==('lSPrev')&&$(e.target).attr('class')!==('lSNext')){
startCoords=(settings.vertical===true) ? e.pageY:e.pageX;
isDraging=true;
if(e.preventDefault){
e.preventDefault();
}else{
e.returnValue=false;
}
$slide.scrollLeft +=1;
$slide.scrollLeft -=1;
$slide.find('.lightSlider').removeClass('lsGrab').addClass('lsGrabbing');
clearInterval(interval);
}});
$(window).on('mousemove', function (e){
if(isDraging){
endCoords=(settings.vertical===true) ? e.pageY:e.pageX;
$this.touchMove(endCoords, startCoords);
}});
$(window).on('mouseup', function (e){
if(isDraging){
$slide.find('.lightSlider').removeClass('lsGrabbing').addClass('lsGrab');
isDraging=false;
endCoords=(settings.vertical===true) ? e.pageY:e.pageX;
var distance=endCoords - startCoords;
if(Math.abs(distance) >=settings.swipeThreshold){
$(window).on('click.ls', function (e){
if(e.preventDefault){
e.preventDefault();
}else{
e.returnValue=false;
}
e.stopImmediatePropagation();
e.stopPropagation();
$(window).off('click.ls');
});
}
$this.touchEnd(distance);
}});
}},
enableTouch: function (){
var $this=this;
if(isTouch){
var startCoords={},
endCoords={};
$slide.on('touchstart', function (e){
endCoords=e.originalEvent.targetTouches[0];
startCoords.pageX=e.originalEvent.targetTouches[0].pageX;
startCoords.pageY=e.originalEvent.targetTouches[0].pageY;
clearInterval(interval);
});
$slide.on('touchmove', function (e){
if(w < elSize){
if(w!==0){
return false;
}}
var orig=e.originalEvent;
endCoords=orig.targetTouches[0];
var xMovement=Math.abs(endCoords.pageX - startCoords.pageX);
var yMovement=Math.abs(endCoords.pageY - startCoords.pageY);
if(settings.vertical===true){
if((yMovement * 3) > xMovement){
e.preventDefault();
}
$this.touchMove(endCoords.pageY, startCoords.pageY);
}else{
if((xMovement * 3) > yMovement){
e.preventDefault();
}
$this.touchMove(endCoords.pageX, startCoords.pageX);
}});
$slide.on('touchend', function (){
if(w < elSize){
if(w!==0){
return false;
}}
var distance;
if(settings.vertical===true){
distance=endCoords.pageY - startCoords.pageY;
}else{
distance=endCoords.pageX - startCoords.pageX;
}
$this.touchEnd(distance);
});
}},
build: function (){
var $this=this;
$this.initialStyle();
if(this.doCss()){
if(settings.enableTouch===true){
$this.enableTouch();
}
if(settings.enableDrag===true){
$this.enableDrag();
}}
$(window).on('focus', function(){
$this.auto();
});
$(window).on('blur', function(){
clearInterval(interval);
});
$this.pager();
$this.pauseOnHover();
$this.controls();
$this.keyPress();
}};
plugin.build();
refresh.init=function (){
refresh.chbreakpoint();
if(settings.vertical===true){
if(settings.item > 1){
elSize=settings.verticalHeight;
}else{
elSize=$children.outerHeight();
}
$slide.css('height', elSize + 'px');
}else{
elSize=$slide.outerWidth();
}
if(settings.loop===true&&settings.mode==='slide'){
refresh.clone();
}
refresh.calL();
if(settings.mode==='slide'){
$el.removeClass('lSSlide');
}
if(settings.mode==='slide'){
refresh.calSW();
refresh.sSW();
}
setTimeout(function (){
if(settings.mode==='slide'){
$el.addClass('lSSlide');
}}, 1000);
if(settings.pager){
refresh.createPager();
}
if(settings.adaptiveHeight===true&&settings.vertical===false){
$el.css('height', $children.eq(scene).outerHeight(true));
}
if(settings.adaptiveHeight===false){
if(settings.mode==='slide'){
if(settings.vertical===false){
plugin.setHeight($el, false);
}else{
plugin.auto();
}}else{
plugin.setHeight($el, true);
}}
if(settings.gallery===true){
plugin.slideThumb();
}
if(settings.mode==='slide'){
plugin.slide();
}
if(settings.autoWidth===false){
if($children.length <=settings.item){
$slide.find('.lSAction').hide();
}else{
$slide.find('.lSAction').show();
}}else{
if((refresh.calWidth(false) < elSize)&&(w!==0)){
$slide.find('.lSAction').hide();
}else{
$slide.find('.lSAction').show();
}}
};
$el.goToPrevSlide=function (){
if(scene > 0){
settings.onBeforePrevSlide.call(this, $el, scene);
scene--;
$el.mode(false);
if(settings.gallery===true){
plugin.slideThumb();
}}else{
if(settings.loop===true){
settings.onBeforePrevSlide.call(this, $el, scene);
if(settings.mode==='fade'){
var l=(length - 1);
scene=parseInt(l / settings.slideMove);
}
$el.mode(false);
if(settings.gallery===true){
plugin.slideThumb();
}}else if(settings.slideEndAnimation===true){
$el.addClass('leftEnd');
setTimeout(function (){
$el.removeClass('leftEnd');
}, 400);
}}
};
$el.goToNextSlide=function (){
var nextI=true;
if(settings.mode==='slide'){
var _slideValue=plugin.slideValue();
nextI=_slideValue < w - elSize - settings.slideMargin;
}
if(((scene * settings.slideMove) < length - settings.slideMove)&&nextI){
settings.onBeforeNextSlide.call(this, $el, scene);
scene++;
$el.mode(false);
if(settings.gallery===true){
plugin.slideThumb();
}}else{
if(settings.loop===true){
settings.onBeforeNextSlide.call(this, $el, scene);
scene=0;
$el.mode(false);
if(settings.gallery===true){
plugin.slideThumb();
}}else if(settings.slideEndAnimation===true){
$el.addClass('rightEnd');
setTimeout(function (){
$el.removeClass('rightEnd');
}, 400);
}}
};
$el.mode=function (_touch){
if(settings.adaptiveHeight===true&&settings.vertical===false){
$el.css('height', $children.eq(scene).outerHeight(true));
}
if(on===false){
if(settings.mode==='slide'){
if(plugin.doCss()){
$el.addClass('lSSlide');
if(settings.speed!==''){
$slide.css('transition-duration', settings.speed + 'ms');
}
if(settings.cssEasing!==''){
$slide.css('transition-timing-function', settings.cssEasing);
}}
}else{
if(plugin.doCss()){
if(settings.speed!==''){
$el.css('transition-duration', settings.speed + 'ms');
}
if(settings.cssEasing!==''){
$el.css('transition-timing-function', settings.cssEasing);
}}
}}
if(!_touch){
settings.onBeforeSlide.call(this, $el, scene);
}
if(settings.mode==='slide'){
plugin.slide();
}else{
plugin.fade();
}
if(!$slide.hasClass('ls-hover')){
plugin.auto();
}
setTimeout(function (){
if(!_touch){
settings.onAfterSlide.call(this, $el, scene);
}}, settings.speed);
on=true;
};
$el.play=function (){
$el.goToNextSlide();
settings.auto=true;
plugin.auto();
};
$el.pause=function (){
settings.auto=false;
clearInterval(interval);
};
$el.refresh=function (){
refresh.init();
};
$el.getCurrentSlideCount=function (){
var sc=scene;
if(settings.loop){
var ln=$slide.find('.lslide').length,
cl=$el.find('.clone.left').length;
if(scene <=cl - 1){
sc=ln + (scene - cl);
}else if(scene >=(ln + cl)){
sc=scene - ln - cl;
}else{
sc=scene - cl;
}}
return sc + 1;
};
$el.getTotalSlideCount=function (){
return $slide.find('.lslide').length;
};
$el.goToSlide=function (s){
if(settings.loop){
scene=(s + $el.find('.clone.left').length - 1);
}else{
scene=s;
}
$el.mode(false);
if(settings.gallery===true){
plugin.slideThumb();
}};
$el.destroy=function (){
if($el.lightSlider){
$el.goToPrevSlide=function(){};
$el.goToNextSlide=function(){};
$el.mode=function(){};
$el.play=function(){};
$el.pause=function(){};
$el.refresh=function(){};
$el.getCurrentSlideCount=function(){};
$el.getTotalSlideCount=function(){};
$el.goToSlide=function(){};
$el.lightSlider=null;
refresh={
init:function(){}};
$el.parent().parent().find('.lSAction, .lSPager').remove();
$el.removeClass('lightSlider lSFade lSSlide lsGrab lsGrabbing leftEnd right').removeAttr('style').unwrap().unwrap();
$el.children().removeAttr('style');
$children.removeClass('lslide active');
$el.find('.clone').remove();
$children=null;
interval=null;
on=false;
scene=0;
}};
setTimeout(function (){
settings.onSliderLoad.call(this, $el);
}, 10);
$(window).on('resize orientationchange', function (e){
setTimeout(function (){
if(e.preventDefault){
e.preventDefault();
}else{
e.returnValue=false;
}
refresh.init();
}, 200);
});
return this;
};}(jQuery));
(function(){
var MutationObserver, Util, WeakMap, getComputedStyle, getComputedStyleRX,
bind=function(fn, me){ return function(){ return fn.apply(me, arguments); };},
indexOf=[].indexOf||function(item){ for (var i=0, l=this.length; i < l; i++){ if(i in this&&this[i]===item) return i; } return -1; };
Util=(function(){
function Util(){}
Util.prototype.extend=function(custom, defaults){
var key, value;
for (key in defaults){
value=defaults[key];
if(custom[key]==null){
custom[key]=value;
}}
return custom;
};
Util.prototype.isMobile=function(agent){
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(agent);
};
Util.prototype.createEvent=function(event, bubble, cancel, detail){
var customEvent;
if(bubble==null){
bubble=false;
}
if(cancel==null){
cancel=false;
}
if(detail==null){
detail=null;
}
if(document.createEvent!=null){
customEvent=document.createEvent('CustomEvent');
customEvent.initCustomEvent(event, bubble, cancel, detail);
}else if(document.createEventObject!=null){
customEvent=document.createEventObject();
customEvent.eventType=event;
}else{
customEvent.eventName=event;
}
return customEvent;
};
Util.prototype.emitEvent=function(elem, event){
if(elem.dispatchEvent!=null){
return elem.dispatchEvent(event);
}else if(event in (elem!=null)){
return elem[event]();
}else if(("on" + event) in (elem!=null)){
return elem["on" + event]();
}};
Util.prototype.addEvent=function(elem, event, fn){
if(elem.addEventListener!=null){
return elem.addEventListener(event, fn, false);
}else if(elem.attachEvent!=null){
return elem.attachEvent("on" + event, fn);
}else{
return elem[event]=fn;
}};
Util.prototype.removeEvent=function(elem, event, fn){
if(elem.removeEventListener!=null){
return elem.removeEventListener(event, fn, false);
}else if(elem.detachEvent!=null){
return elem.detachEvent("on" + event, fn);
}else{
return delete elem[event];
}};
Util.prototype.innerHeight=function(){
if('innerHeight' in window){
return window.innerHeight;
}else{
return document.documentElement.clientHeight;
}};
return Util;
})();
WeakMap=this.WeakMap||this.MozWeakMap||(WeakMap=(function(){
function WeakMap(){
this.keys=[];
this.values=[];
}
WeakMap.prototype.get=function(key){
var i, item, j, len, ref;
ref=this.keys;
for (i=j = 0, len=ref.length; j < len; i=++j){
item=ref[i];
if(item===key){
return this.values[i];
}}
};
WeakMap.prototype.set=function(key, value){
var i, item, j, len, ref;
ref=this.keys;
for (i=j = 0, len=ref.length; j < len; i=++j){
item=ref[i];
if(item===key){
this.values[i]=value;
return;
}}
this.keys.push(key);
return this.values.push(value);
};
return WeakMap;
})());
MutationObserver=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(MutationObserver=(function(){
function MutationObserver(){
if(typeof console!=="undefined"&&console!==null){
console.warn('MutationObserver is not supported by your browser.');
}
if(typeof console!=="undefined"&&console!==null){
console.warn('WOW.js cannot detect dom mutations, please call .sync() after loading new content.');
}}
MutationObserver.notSupported=true;
MutationObserver.prototype.observe=function(){};
return MutationObserver;
})());
getComputedStyle=this.getComputedStyle||function(el, pseudo){
this.getPropertyValue=function(prop){
var ref;
if(prop==='float'){
prop='styleFloat';
}
if(getComputedStyleRX.test(prop)){
prop.replace(getComputedStyleRX, function(_, _char){
return _char.toUpperCase();
});
}
return ((ref=el.currentStyle)!=null ? ref[prop]:void 0)||null;
};
return this;
};
getComputedStyleRX=/(\-([a-z]){1})/g;
this.WOW=(function(){
WOW.prototype.defaults={
boxClass: 'wow',
animateClass: 'animated',
offset: 0,
mobile: true,
live: true,
callback: null,
scrollContainer: null
};
function WOW(options){
if(options==null){
options={};}
this.scrollCallback=bind(this.scrollCallback, this);
this.scrollHandler=bind(this.scrollHandler, this);
this.resetAnimation=bind(this.resetAnimation, this);
this.start=bind(this.start, this);
this.scrolled=true;
this.config=this.util().extend(options, this.defaults);
if(options.scrollContainer!=null){
this.config.scrollContainer=document.querySelector(options.scrollContainer);
}
this.animationNameCache=new WeakMap();
this.wowEvent=this.util().createEvent(this.config.boxClass);
}
WOW.prototype.init=function(){
var ref;
this.element=window.document.documentElement;
if((ref=document.readyState)==="interactive"||ref==="complete"){
this.start();
}else{
this.util().addEvent(document, 'DOMContentLoaded', this.start);
}
return this.finished=[];
};
WOW.prototype.start=function(){
var box, j, len, ref;
this.stopped=false;
this.boxes=(function(){
var j, len, ref, results;
ref=this.element.querySelectorAll("." + this.config.boxClass);
results=[];
for (j=0, len=ref.length; j < len; j++){
box=ref[j];
results.push(box);
}
return results;
}).call(this);
this.all=(function(){
var j, len, ref, results;
ref=this.boxes;
results=[];
for (j=0, len=ref.length; j < len; j++){
box=ref[j];
results.push(box);
}
return results;
}).call(this);
if(this.boxes.length){
if(this.disabled()){
this.resetStyle();
}else{
ref=this.boxes;
for (j=0, len=ref.length; j < len; j++){
box=ref[j];
this.applyStyle(box, true);
}}
}
if(!this.disabled()){
this.util().addEvent(this.config.scrollContainer||window, 'scroll', this.scrollHandler);
this.util().addEvent(window, 'resize', this.scrollHandler);
this.interval=setInterval(this.scrollCallback, 50);
}
if(this.config.live){
return new MutationObserver((function(_this){
return function(records){
var k, len1, node, record, results;
results=[];
for (k=0, len1=records.length; k < len1; k++){
record=records[k];
results.push((function(){
var l, len2, ref1, results1;
ref1=record.addedNodes||[];
results1=[];
for (l=0, len2=ref1.length; l < len2; l++){
node=ref1[l];
results1.push(this.doSync(node));
}
return results1;
}).call(_this));
}
return results;
};})(this)).observe(document.body, {
childList: true,
subtree: true
});
}};
WOW.prototype.stop=function(){
this.stopped=true;
this.util().removeEvent(this.config.scrollContainer||window, 'scroll', this.scrollHandler);
this.util().removeEvent(window, 'resize', this.scrollHandler);
if(this.interval!=null){
return clearInterval(this.interval);
}};
WOW.prototype.sync=function(element){
if(MutationObserver.notSupported){
return this.doSync(this.element);
}};
WOW.prototype.doSync=function(element){
var box, j, len, ref, results;
if(element==null){
element=this.element;
}
if(element.nodeType!==1){
return;
}
element=element.parentNode||element;
ref=element.querySelectorAll("." + this.config.boxClass);
results=[];
for (j=0, len=ref.length; j < len; j++){
box=ref[j];
if(indexOf.call(this.all, box) < 0){
this.boxes.push(box);
this.all.push(box);
if(this.stopped||this.disabled()){
this.resetStyle();
}else{
this.applyStyle(box, true);
}
results.push(this.scrolled=true);
}else{
results.push(void 0);
}}
return results;
};
WOW.prototype.show=function(box){
this.applyStyle(box);
box.className=box.className + " " + this.config.animateClass;
if(this.config.callback!=null){
this.config.callback(box);
}
this.util().emitEvent(box, this.wowEvent);
this.util().addEvent(box, 'animationend', this.resetAnimation);
this.util().addEvent(box, 'oanimationend', this.resetAnimation);
this.util().addEvent(box, 'webkitAnimationEnd', this.resetAnimation);
this.util().addEvent(box, 'MSAnimationEnd', this.resetAnimation);
return box;
};
WOW.prototype.applyStyle=function(box, hidden){
var delay, duration, iteration;
duration=box.getAttribute('data-wow-duration');
delay=box.getAttribute('data-wow-delay');
iteration=box.getAttribute('data-wow-iteration');
return this.animate((function(_this){
return function(){
return _this.customStyle(box, hidden, duration, delay, iteration);
};})(this));
};
WOW.prototype.animate=(function(){
if('requestAnimationFrame' in window){
return function(callback){
return window.requestAnimationFrame(callback);
};}else{
return function(callback){
return callback();
};}})();
WOW.prototype.resetStyle=function(){
var box, j, len, ref, results;
ref=this.boxes;
results=[];
for (j=0, len=ref.length; j < len; j++){
box=ref[j];
results.push(box.style.visibility='visible');
}
return results;
};
WOW.prototype.resetAnimation=function(event){
var target;
if(event.type.toLowerCase().indexOf('animationend') >=0){
target=event.target||event.srcElement;
return target.className=target.className.replace(this.config.animateClass, '').trim();
}};
WOW.prototype.customStyle=function(box, hidden, duration, delay, iteration){
if(hidden){
this.cacheAnimationName(box);
}
box.style.visibility=hidden ? 'hidden':'visible';
if(duration){
this.vendorSet(box.style, {
animationDuration: duration
});
}
if(delay){
this.vendorSet(box.style, {
animationDelay: delay
});
}
if(iteration){
this.vendorSet(box.style, {
animationIterationCount: iteration
});
}
this.vendorSet(box.style, {
animationName: hidden ? 'none':this.cachedAnimationName(box)
});
return box;
};
WOW.prototype.vendors=["moz", "webkit"];
WOW.prototype.vendorSet=function(elem, properties){
var name, results, value, vendor;
results=[];
for (name in properties){
value=properties[name];
elem["" + name]=value;
results.push((function(){
var j, len, ref, results1;
ref=this.vendors;
results1=[];
for (j=0, len=ref.length; j < len; j++){
vendor=ref[j];
results1.push(elem["" + vendor + (name.charAt(0).toUpperCase()) + (name.substr(1))]=value);
}
return results1;
}).call(this));
}
return results;
};
WOW.prototype.vendorCSS=function(elem, property){
var j, len, ref, result, style, vendor;
style=getComputedStyle(elem);
result=style.getPropertyCSSValue(property);
ref=this.vendors;
for (j=0, len=ref.length; j < len; j++){
vendor=ref[j];
result=result||style.getPropertyCSSValue("-" + vendor + "-" + property);
}
return result;
};
WOW.prototype.animationName=function(box){
var animationName, error;
try {
animationName=this.vendorCSS(box, 'animation-name').cssText;
} catch (error){
animationName=getComputedStyle(box).getPropertyValue('animation-name');
}
if(animationName==='none'){
return '';
}else{
return animationName;
}};
WOW.prototype.cacheAnimationName=function(box){
return this.animationNameCache.set(box, this.animationName(box));
};
WOW.prototype.cachedAnimationName=function(box){
return this.animationNameCache.get(box);
};
WOW.prototype.scrollHandler=function(){
return this.scrolled=true;
};
WOW.prototype.scrollCallback=function(){
var box;
if(this.scrolled){
this.scrolled=false;
this.boxes=(function(){
var j, len, ref, results;
ref=this.boxes;
results=[];
for (j=0, len=ref.length; j < len; j++){
box=ref[j];
if(!(box)){
continue;
}
if(this.isVisible(box)){
this.show(box);
continue;
}
results.push(box);
}
return results;
}).call(this);
if(!(this.boxes.length||this.config.live)){
return this.stop();
}}
};
WOW.prototype.offsetTop=function(element){
var top;
while (element.offsetTop===void 0){
element=element.parentNode;
}
top=element.offsetTop;
while (element=element.offsetParent){
top +=element.offsetTop;
}
return top;
};
WOW.prototype.isVisible=function(box){
var bottom, offset, top, viewBottom, viewTop;
offset=box.getAttribute('data-wow-offset')||this.config.offset;
viewTop=(this.config.scrollContainer&&this.config.scrollContainer.scrollTop)||window.pageYOffset;
viewBottom=viewTop + Math.min(this.element.clientHeight, this.util().innerHeight()) - offset;
top=this.offsetTop(box);
bottom=top + box.clientHeight;
return top <=viewBottom&&bottom >=viewTop;
};
WOW.prototype.util=function(){
return this._util!=null ? this._util:this._util=new Util();
};
WOW.prototype.disabled=function(){
return !this.config.mobile&&this.util().isMobile(navigator.userAgent);
};
return WOW;
})();
}).call(this);
jQuery(document).ready(function($){
"use strict";
$('.featuredSlider').lightSlider({
adaptiveHeight:true,
item:1,
slideMargin:0,
enableDrag:false,
loop:true,
pager:false,
auto:true,
speed: 700,
pause: 4200,
onSliderLoad: function(){
$('.featuredSlider').removeClass('cS-hidden');
}});
$('#vmag-news-ticker').lightSlider({
loop:true,
vertical: true,
pager:false,
auto:true,
speed: 600,
pause: 3000,
enableDrag:false,
verticalHeight:80,
onSliderLoad: function(){
$('#vmag-news-ticker').removeClass('cS-hidden');
}});
$('.block-carousel').lightSlider({
pager:false,
speed:650,
enableDrag:false,
responsive:[
{
breakpoint:840,
settings: {
item:2,
slideMove:1,
slideMargin:6,
}},
{
breakpoint:480,
settings: {
item:1,
slideMove:1
}}
],
onSliderLoad: function(){
$('.block-carousel').removeClass('cS-hidden');
}});
$('.widget-cat-slider').lightSlider({
adaptiveHeight:true,
item:1,
slideMargin:0,
loop:true,
controls:false,
enableDrag:false,
speed: 700,
onSliderLoad: function(){
$('.widget-cat-slider').removeClass('cS-hidden');
}});
$('.vmag-search-in-primary').click(function(event){
$('.vmag-search-form-primary').toggleClass('search-in');
});
$('.nav-toggle').on('vclick click keypress',function (e){
e.preventDefault();
$('.nav-wrapper .menu').slideToggle('slow');
$(this).parent('.nav-wrapper').toggleClass('active');
});
jQuery('.nav-wrapper .menu-item-has-children > a,.nav-wrapper .page_item_has_children > a').wrap('');
$('.nav-wrapper .menu-item-has-children .sub-wrap').append('');
$('.nav-wrapper .page_item_has_children .sub-wrap').append('');
$('.nav-wrapper .sub-toggle').click(function(){
$(this).parents('.menu-item-has-children').children('ul.sub-menu').first().slideToggle('1000');
$(this).children('.fa-angle-right').first().toggleClass('fa-angle-down');
});
$('.nav-wrapper .sub-toggle-children').click(function(){
$(this).parents('.page_item_has_children').children('ul.children').first().slideToggle('1000');
$(this).children('.fa-angle-right').first().toggleClass('fa-angle-down');
});
$('.vmag-cat-tabs').each(function(){
$(this).find('.cat-tab:first').addClass('active');
});
$('.vmag-tabbed-wrapper').each(function(){
$(this).find('.vmag-tabbed-section:first').show();
});
$('#vmag-widget-tabbed li a').click(function(event){
var tabId=$(this).attr('id');
$('.vmag-tabbed-section').hide();
$('#section-'+tabId).show();
$('.cat-tab').removeClass('active');
$(this).parent('li').addClass('active');
});
var WowOptionVal=vmag_custom_loc.mode;
if(WowOptionVal=='enable'&&$('body').hasClass('home')){
new WOW().init();
}
$("#scroll-up").hide();
$(function (){
$(window).scroll(function (){
if($(this).scrollTop() > 1000){
$('#scroll-up').fadeIn();
}else{
$('#scroll-up').fadeOut();
}});
$('a#scroll-up').click(function (){
$('body,html').animate({
scrollTop: 0
}, 800);
return false;
});
});
var date_show=vmag_custom_loc.date;
if(date_show=='show'){
var myVar=setInterval(function(){
vmagTime();
}, 100);
function vmagTime(){
var d=new Date();
document.getElementById("time").innerHTML=d.toLocaleTimeString();
}}
});
window.addComment=function(s){var u,f,v,y=s.document,p={commentReplyClass:"comment-reply-link",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=s.MutationObserver||s.WebKitMutationObserver||s.MozMutationObserver,i="querySelector"in y&&"addEventListener"in s,n=!!y.documentElement.dataset;function t(){r(),function(){if(!e)return;new e(d).observe(y.body,{childList:!0,subtree:!0})}()}function r(e){if(i&&(u=I(p.cancelReplyId),f=I(p.commentFormId),u)){u.addEventListener("touchstart",a),u.addEventListener("click",a);var t=function(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode)return f.removeEventListener("keydown",t),e.preventDefault(),f.submit.click(),!1};f&&f.addEventListener("keydown",t);for(var n,r=function(e){var t,n=p.commentReplyClass;e&&e.childNodes||(e=y);t=y.getElementsByClassName?e.getElementsByClassName(n):e.querySelectorAll("."+n);return t}(e),d=0,o=r.length;d-v&&f.left<=r+h&&f.right>-h}if(u){s.on(z,k),B("show",s);var A=d.srcAttr,g=E(A)?A(s):l.getAttribute(A);g&&(l.src=g),c=!0}else i=X()||(r||setTimeout(s,0),r=2))}function l(){a.lazyLoadXT()}function f(){i(!0)}m[p]=d(b,n,m[p]),m.fn[p]=function(a){var e,r=c(a=a||{},"blankImage"),i=c(a,"checkDuplicates"),t=c(a,"scrollContainer"),s=c(a,"show"),l={};for(e in m(t).on("scroll",u),n)l[e]=c(a,e);return this.each(function(e,t){if(t===y)m(b.selector).lazyLoadXT(a);else{var o=i&&T(t,w),n=m(t).data(w,s?-1:1);if(o)return void u();r&&"IMG"===t.tagName&&!t.src&&(t.src=r),n[p]=d({},l),B("init",n),L.push(n),u()}})},m(e).ready(function(){B("start",a),a.on(b.updateEvent,u).on(b.forceEvent,f),m(e).on(b.updateEvent,u),b.autoInit&&(a.on(b.loadEvent,l),l())})}(window.jQuery||window.Zepto||window.$,window,document),function(s){var o=s.lazyLoadXT;o.selector+=",video,iframe[data-src],embed[data-src]",o.videoPoster="data-poster",s(document).on("lazyshow","video",function(e,t){var a=t.lazyLoadXT.srcAttr,r=s.isFunction(a),i=!1;t.attr("poster",t.attr(o.videoPoster)),t.children("source,track").each(function(e,t){var o=s(t),n=r?a(o):o.attr(a);n&&(o.attr("src",n),i=!0)}),i&&void 0!==s(this).attr("preload")&&"none"!=s(this).attr("preload")&&this.load(),s(this).removeClass("lazy-hidden")}),s(document).on("lazyshow","embed",function(e,t){s(this).removeClass("lazy-hidden")})}(window.jQuery||window.Zepto||window.$);
!function(t,r,e,s){var n,a,c=t.lazyLoadXT,i="srcset"in new Image,o=/^\s*(\S*)/,d=/\S\s+(\d+)w/,u=/\S\s+(\d+)h/,l=/\S\s+([\d\.]+)x/,x=[0,1/0],w=[0,1],h={srcsetAttr:"data-srcset",srcsetExtended:!0,srcsetBaseAttr:"data-srcset-base",srcsetExtAttr:"data-srcset-ext"},f={w:0,h:0,x:0};for(n in h)void 0===c[n]&&(c[n]=h[n]);function p(r,e){return Math[e].apply(null,t.map(r,function(t){return t[n]}))}function A(t){return t[n]>=f[n]||t[n]===a}function m(t){return t[n]===a}function g(s){var i=s.attr(c.srcsetAttr);if(!i)return!1;var h=t.map(i.replace(/(\s[\d.]+[whx]),/g,"$1 @,@ ").split(" @,@ "),function(t){return{url:o.exec(t)[1],w:parseFloat((d.exec(t)||x)[1]),h:parseFloat((u.exec(t)||x)[1]),x:parseFloat((l.exec(t)||w)[1])}});if(!h.length)return!1;var g,v,y=e.documentElement;for(g in f={w:r.innerWidth||y.clientWidth,h:r.innerHeight||y.clientHeight,x:r.devicePixelRatio||1})n=g,a=p(h,"max"),h=t.grep(h,A);for(g in f)n=g,a=p(h,"min"),h=t.grep(h,m);return v=h[0].url,c.srcsetExtended&&(v=(s.attr(c.srcsetBaseAttr)||"")+v+(s.attr(c.srcsetExtAttr)||"")),v}c.selector+=",img["+c.srcsetAttr+"],source["+c.srcsetAttr+"]",t(e).on("lazyshow","img",function(t,r){var e=r.attr(c.srcsetAttr);e&&(!c.srcsetExtended&&i?(r.attr("srcset",e),r.attr("data-srcset","")):r.lazyLoadXT.srcAttr=g)}),t(e).on("lazyshow","source",function(r,e){t(this).removeClass("lazy-hidden");var s=e.attr(c.srcsetAttr);s&&(!c.srcsetExtended&&i?(e.attr("srcset",s),e.attr("data-srcset","")):e.lazyLoadXT.srcAttr=g)})}(window.jQuery||window.Zepto||window.$,window,document);
jQuery.lazyLoadXT.updateEvent='load orientationchange resize scroll touchmove focus click customlazyloadxtevent';
jQuery.lazyLoadXT.edgeY=a3_lazyload_extend_params.edgeY;
jQuery.lazyLoadXT.srcsetExtended=false;
if(typeof a3_lazyload_extend_params.horizontal_container_classnames!=='undefined'&&''!==a3_lazyload_extend_params.horizontal_container_classnames){
jQuery.lazyLoadXT.scrollContainer=a3_lazyload_extend_params.horizontal_container_classnames;
}
jQuery(document).ready(function($){
jQuery(document).on('mouseenter', '.site-header-cart', function(){
jQuery(document).trigger('customlazyloadxtevent');
});
jQuery(document).on('mouseenter', '.widget_shopping_cart', function(){
jQuery(document).trigger('customlazyloadxtevent');
});
jQuery(document).on('mouseover', '#wp-admin-bar-top-secondary', function(){
jQuery(document).trigger('customlazyloadxtevent');
});
});
jQuery(window).on('ajaxComplete', function(){
setTimeout(function(){
jQuery(window).lazyLoadXT();
}, 1000);
});
!function(d,l){"use strict";var e=!1,o=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){var r,a,i,s,n,o=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),c=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]');for(r=0;r